<?php 
class yg extends IController
{
 public function add()
 {
 	$this->redirect("add");
 }
 public function adds()
 {
 	//实例化一个表
 	$model=new IModel("yg");
 	//接值
 	$u_name=IReq::get("u_name");
 	$u_pwd=IReq::get("u_pwd");
 	$u_pwd1=IReq::get("u_pwd1");
 	$u_zname=IReq::get("u_zname");
 	$u_price=IReq::get("u_price");
 	$data=array("u_name"=>$u_name,
 		        "u_pwd"=>$u_pwd,
 		        "u_pwd1"=>$u_pwd1,
 		        "u_zname"=>$u_zname,
 		        "u_price"=>$u_price);
 	$model->setData($data);
 	$res=$model->add();
 	if($res)
 	{
 		echo 1;
 	}
 	else
 	{
 		echo 2;
 	}
 }
}
 ?>
